<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">
li.num
{
  position: relative;
  display: inline-block;
  margin-right: 2px;
  list-style:upper-alpha outside none;;
}
</style>
</head>
<body>
	<!--用一个超链接发送到HelloControllergfc  -->
	<a href="test.do">Spring MVC 示例</a>
	<a href="Person.do" id="but">Person信息</a>
	<a href="Delete.do">Delete</a>
	
	<ul id="test"></ul>
	
	<a class="at" href=""> sssss</a>
	<script src="JS/jquery-1.10.0.js"></script>
	<script>
	$(function(){
		$.ajax({
			url : "pagecount.do",
			//data : {cur:1},
			type : "GET",
			dataType:"html",
			success : function(data){
				const num=Math.max(1,Math.min(10,data));
				for(let i=0;i<num;i++){
					//alert(i);
					var $li=$('<li><a href="" ></a></li>').addClass('num').appendTo($('#test'));
					$('a',$li).attr('href',"page.do?pageid="+i).html(i);
				}
				if(num<data){
					var $li=$('<li><a href=""></a></li>').addClass('num').appendTo($('#test'));
					$('a',$li).html('最后');
				}
			}
		});
	});
		

	</script>


</body>
</html>